using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.Net;

namespace SpeedTest_V2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void start(object sender, EventArgs e)
        {
            
            if (radioButton1.Checked)
            {
                speedtest1024 openspeed1024 = new speedtest1024();
                openspeed1024.Show();
            }
            else {

                speedtest5120 openspeed5120 = new speedtest5120();
                openspeed5120.Show();
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            label1.Text = "SpeedTest";
        }

        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form1 frm1 = new Form1();
            frm1.notifyIcon1.Visible = false;
            frm1.Show();
            frm1.Activate();
        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void speedTest1024kbToolStripMenuItem_Click(object sender, EventArgs e)
        {
            speedtest1024 open1024 = new speedtest1024();
            open1024.Show();
        }

        private void speedTest5120kbToolStripMenuItem_Click(object sender, EventArgs e)
        {
            speedtest5120 open5120 = new speedtest5120();
            open5120.Show();
        }

        private void geemuchToolStripMenuItem_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("http://www.geemu.ch");
        }

        private void beendenToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            Form1 frm1 = new Form1();
            frm1.notifyIcon1.Visible = false;
            frm1.Show();
            frm1.Activate();
        }

        private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            MessageBox.Show("SpeedTest by Elk\nVersion 2.0\nwww.geemu.ch", "About Speedtest", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
    }
}